<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>一般工程抗震设防审查情况</title>
    <script src="../../js/header.js"></script>
    <style type="text/css">
        html, body, #app {
            padding: 0px;
            margin: 0px;
        }

        #app {
            border-top: 3px solid #0D9AFF;
            padding: 25px;
        }

        .tab-title {
            font-size: 16px;
            font-weight: bold;
            border-left: 4px solid #0D9AFF;
            font-family: PingFangSC-Medium;
            padding-left: 10px;
            margin-bottom: 20px;
        }

        .pagination {
            text-align: center;
            margin-top: 30px;
        }

        .el-dialog__footer {
            padding: 10px 20px 20px;
            text-align: center;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

        .el-dialog__body {
            color: rgb(96, 98, 102);
            font-size: 14px;
            word-break: break-all;
            padding: 0px 20px;
        }

        .el-input__inner {
            -webkit-appearance: none;
            background-color: #FFF;
            background-image: none;
            border-radius: 4px;
            border: 1px solid #DCDFE6;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            color: #606266;
            display: inline-block;
            font-size: inherit;
            height: 30px;
            line-height: 30px;
            outline: 0;
            padding: 0 15px;
            -webkit-transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
            transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
            width: 100%;
        }

        /*//拟制公告*/
        .companycredit_gonggao .el-form-item__content {
            margin-left: 0 !important;
        }

        .companycredit_publicstate .el-select {
            width: auto;
        }

        /* 拟制公告---封装样式 */
        .content_tab {
            padding: 20px 0;
        }

        .border_btm {
            border-bottom: 1px solid #ddd;
        }

        .border_right {
            border-right: 1px solid #ddd;
        }
        /* 搜索按钮样式修改 */
        #app .el-button.is-circle.search_btn{
            position: absolute;
            right: 0;
            top: 0;
            border: 0;
            background: none;
        }
        #app .el-button.is-circle.search_btn i{
            font-size: 17px;
        }
    </style>
</head>

<body>
<div v-cloak id="app">
    <div style="margin-top: 10px; border-bottom:1px solid rgba(200,200,200,0.43);">
        <el-form :model="selectForm" ref="selectForm" label-width="150px">
            <el-row>
                <el-col :span="6">
                    <el-form-item label="项目名称:" prop="proName" label-width="100px">
                        <el-input v-model="selectForm.proName" style="width: 250px;" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col span="6">
                    <el-form-item label="单位名称:" prop="unitName" label-width="100px">
                        <el-input v-model="selectForm.unitName" style="width: 250px;" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <el-col span="10">
                    <el-form-item label="填报部门:" prop="reCreateDepartment" label-width="100px">
                        <el-input v-model="selectForm.reCreateDepartment" style="width: 300px;"
                                  placeholder=""></el-input>
                    </el-form-item>
                </el-col>
            </el-row>

            <el-row>
                <el-col :span="6">
                    <el-form-item label="审定状态:" style="width: 330px;" label-width="100px" prop="checkStatus">
                        <el-select v-model="selectForm.checkStatus" placeholder="请选择" style="width: 250px;">
                            <el-option label="未提交" value="0"></el-option>
                            <el-option label="已提交待审定" value="1"></el-option>
                            <el-option label="审定未通过" value="2"></el-option>
                            <el-option label="审定已通过" value="3"></el-option>
                        </el-select>
                    </el-form-item>
                </el-col>
                <!--<el-col :span="6">-->
                <!--<el-form-item label="上报状态:" style="width: 330px;" label-width="100px" prop="reportStatus">-->
                <!--<el-select v-model="selectForm.reportStatus" placeholder="请选择" style="width: 250px;">-->
                <!--<el-option label="未上报" value="0"></el-option>-->
                <!--<el-option label="已上报" value="1"></el-option>-->
                <!--</el-select>-->
                <!--</el-form-item>-->
                <!--</el-col>-->
                <el-col :span="6">
                    <el-form-item label="填报人员:" prop="reCreateUser" label-width="100px">
                        <el-input v-model="selectForm.reCreateUser" style="width: 250px;" placeholder=""></el-input>
                    </el-form-item>
                </el-col>
                <div style="float: right;">
                    <el-button v-if="orgName!='中国'"type="primary" size="small" style="width: 60px;height: 30px;" @click="apply">新增
                    </el-button>
                    <el-button type="primary" size="small" style="width: 60px;height: 30px;"
                               @click="searchForm('selectForm')">查询
                    </el-button>
                    <el-button type="warning" size="small" style="width: 60px;height: 30px;"
                               @click="resetForm('selectForm')">重置
                    </el-button>
                </div>

            </el-row>
        </el-form>
    </div>

    <!--2 分页表单-->
    <el-table :data="commonproject" border style="width: 100%;margin-top: 35px;"
              :header-cell-style="{background:'#eef1f6',color:'#606266'}">
       <!-- <el-table-column type="selection"></el-table-column>-->
        <el-table-column
                :resizable="false"
                type="index"
                label="序号"
                width="80" align="center">
        </el-table-column>
        <el-table-column
                prop="proName"
                label="项目名称"
                width="300"
                :show-overflow-tooltip="true"
                align="center">
        </el-table-column>
        <el-table-column
                prop="unitName"
                label="单位名称"
                width="230"
                align="center">
        </el-table-column>
        <el-table-column
                prop="checkStatus"
                label="审定状态"
                width="150"
                align="center">
            <template scope="scope">
                <span v-if="scope.row.checkStatus==0" style="color:#F19437;">未提交</span>
                <span v-if="scope.row.checkStatus==1" style="color:#20A0FF;">已提交待审定</span>
                <span v-if="scope.row.checkStatus==2" style="color:#FF4949;">审定未通过</span>
                <span v-if="scope.row.checkStatus==3" style="color:#67C23A;">审定已通过</span>
            </template>
        </el-table-column>
        <el-table-column
                prop="reCreateDepartment"
                label="填报部门"
                width="200"
                align="center">
        </el-table-column>
        <el-table-column
                prop="reCreateUser"
                label="填报人员"
                width="125"
                align="center">
        </el-table-column>
        <el-table-column
                label="操作"
                width=""
                align="center">
            <template slot-scope="scope">
                <!--若上报状态为1：已上报，只展示查看-->
                <span v-if="scope.row.reportStatus=='1'&&orgName=='中国'" style="color:#F19437;">
                    <el-button type="" size="mini"
                                @click="view(scope.$index,scope.row);viewdialogForm = true">查看</el-button>
                    <el-button v-if="scope.row.noticeStatus=='0'" type="info" size="mini"
                               @click="gongGao(scope.$index,scope.row)">拟制公告</el-button>
                    <!--<el-button v-if="scope.row.noticeStatus=='1'" type="primary" size="mini"
                               @click="gongGao(scope.$index,scope.row)" disabled>拟制公告</el-button>-->
                    <el-button v-if="scope.row.noticeStatus=='1'"type="" size="mini" @click="viewgongGao(scope.$index,scope.row)">查看公告</el-button>
                </span>
                <!--若上报状态为0：未上报-->
                <span v-if="scope.row.reportStatus=='0'||(scope.row.reportStatus=='1'&&orgName!='中国')" style="color:#67C23A;">
                        <el-button type="" size="mini" @click="view(scope.$index,scope.row);viewdialogForm = true">
                            查看
                        </el-button>
                        <!--修改功能-->
                        <el-button v-if="scope.row.checkStatus==0||scope.row.checkStatus==2"
                                   type="primary" size="mini" @click="edit(scope.$index,scope.row);editdialogForm = true">
                            修改
                        </el-button>
                        <el-button v-if="scope.row.checkStatus==1||scope.row.checkStatus==3"
                                   type="primary" size="mini" disabled>
                            修改
                        </el-button>
                        <!--提交功能-->
                        <el-button v-if="scope.row.checkStatus==0" type="success" size="mini" @click="submit(scope.$index,scope.row)">
                            提交
                        </el-button>
                        <el-button v-if="scope.row.checkStatus!=0"
                                   type="success"
                                   size="mini"
                                   disabled>
                            提交
                        </el-button>
                        <!--删除功能：状态为0：未提交时可以删除，其他状态不可用-->
                        <el-button v-if="scope.row.checkStatus==0" type="danger" size="mini" @click="del(scope.$index,scope.row);">
                            删除
                        </el-button>
                        <el-button v-if="scope.row.checkStatus!=0" type="danger" size="mini" disabled>
                            删除
                        </el-button>
                </span>
            </template>
        </el-table-column>
    </el-table>
    <div style="overflow: hidden;">
        <div class="pagination">
            <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="currentPage"
                    :page-sizes="[10, 20, 30, 40]"
                    :page-size="pagesize"
                    background
                    layout="total, sizes, prev, pager, next"
                    :total="tableTotal"
                    prev-text="上一页"
                    next-text="下一页">
            </el-pagination>
        </div>
    </div>

    <!--新增弹窗-->
    <el-dialog title="" :visible.sync="newdialogForm" center fullscreen>
        <div style="margin-top: 0px;">
            <el-form :model="newcommonproject" :rules="rules" ref="newcommonproject" label-width="140px">
                <!--建设工程情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设工程情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目名称:" prop="proName" label-width="110px">
                            <el-input v-model="newcommonproject.proName" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目场址:" required label-width="110px">
							<span v-for="(item,index) in newcommonproject.address">
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.provinceValue'" :rules="rules.provinceValue">
										<el-select v-model="item.provinceValue" placeholder="请选择省" @change="chooseProvince(item)" style="">
											<el-option	
									    		v-for="items in item.provinceData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">						
									<el-form-item :prop="'address.'+index+'.cityValue'" :rules="rules.cityValue">
										<el-select v-model="item.cityValue" placeholder="请选择市" @change="chooseCity(item)" style="">
											<el-option	
									    		v-for="items in item.cityData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.areaValue'" :rules="rules.areaValue">									
										<el-select v-model="item.areaValue" placeholder="请选择区、县" @change="chooseArea(item)" style="">
									    	<el-option
										        v-for="items in item.areaData"
										        :key="items.code"
										        :label="items.name"
										        :value="items.name">
										    </el-option>
									    </el-select>
								    </el-form-item>
							    </el-col>
							    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
							    <el-col :span="9">
								    <el-form-item>
								    	<el-input v-model="item.detailAddress" placeholder="填写详细地址" ></el-input>
								    </el-form-item>
							    </el-col>
							    <el-button v-if="index=='0'" size="mini" @click="addAddress()" icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline" style="margin-left: 8px;">跨省</el-button>
							    <el-button v-if="index!='0'" size="mini" @click="delAddress(index,item)" icon="el-icon-delete" style="margin-left: 8px;">删除</el-button>
							</span>	
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="建设内容:" prop="proContent" label-width="110px" :required="reRemarkRequired">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入建设内容"
                                    maxlength="500"
                                    show-word-limit
                                    v-model="newcommonproject.proContent">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--建设单位信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设单位信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="单位名称:" prop="unitName" label-width="90px" style="position: relative;">
                            <el-input v-model="newcommonproject.unitName" placeholder=""></el-input>
                            <el-button icon="el-icon-search" circle class="search_btn"@click="onSearch();dialogFormVisible = true"></el-button>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="联系人:" prop="unitUser" label-width="110px">
                            <el-input v-model="newcommonproject.unitUser" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col span="5">
                        <el-form-item label="电话" prop="unitPhone" label-width="110px">
                            <el-input v-model="newcommonproject.unitPhone" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="营业执照号码或三证合一证照号码:" prop="unitCode" label-width="240px">
                            <el-input v-model="newcommonproject.unitCode" placeholder=""></el-input>
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5">
                        <el-form-item label="法人:" prop="unitLegal" label-width="110px">
                            <el-input v-model="newcommonproject.unitLegal" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--一般工程抗震设防情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        一般工程抗震设防情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="抗震设防依据:" prop="earthquakeBasis" label-width="110px"
                                      :required="earthquakeBasis">
                            <el-select v-model="newcommonproject.earthquakeBasis" placeholder="请选择抗震设防依据" style="width : 80%;">
                                <el-option label="区划图" value="1"></el-option>
                                <el-option label="小区划" value="2"></el-option>
                                <el-option label="区域安全性评估" value="3"></el-option>
                                <el-option label="其他" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="行业性质:" prop="industry" label-width="110px" :required="industry">
                            <el-select v-model="newcommonproject.industry" placeholder="请选择行业性质" style="width : 80%;">
                                <el-option label="城镇给排水、燃气、热力建筑" value="城镇给排水、燃气、热力建筑"></el-option>
                                <el-option label="电力建筑" value="电力建筑"></el-option>
                                <el-option label="交通运输建筑" value="交通运输建筑"></el-option>
                                <el-option label="邮电通信、广播电视建筑" value="邮电通信、广播电视建筑"></el-option>
                                <el-option label="公共建筑" value="公共建筑"></el-option>
                                <el-option label="居住建筑" value="居住建筑"></el-option>
                                <el-option label="工业建筑" value="工业建筑"></el-option>
                                <el-option label="仓库类建筑" value="仓库类建筑"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="22">
                        <el-form-item label="附件:" prop="fujian" label-width="110px">
                            <iframe id="newFrame" style="overflow:hidden;height:200px;width:100%;" width="100%"
                                    frameBorder="0"
                                    :src="link"></iframe>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--项目填报信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        项目信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
                        <el-form-item label="填报日期:" prop="reCreateTime" label-width="110px">
                            <el-date-picker
                                    v-model="newcommonproject.reCreateTime"
                                    type="date"
                                    value-format="yyyy-MM-dd"
                                    placeholder="选择填报日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报人员:" prop="reCreateUser" label-width="110px">
                            <el-input v-model="newcommonproject.reCreateUser" placeholder="请输入填报人员"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报部门:" prop="reCreateDepartment" label-width="110px">
                            <el-input v-model="newcommonproject.reCreateDepartment" placeholder="请输入填报部门"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="备注:" prop="reRemark" label-width="110px">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder=""
                                    maxlength="500"
                                    show-word-limit
                                    v-model="newcommonproject.reRemark">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="22">
                        <div style="float:right;">
                            <el-button type="primary" size="small" style="width: 60px;height: 30px;"
                                       @click="newonSubmit('newcommonproject')">暂存
                            </el-button>
                            <el-button type="primary" size="small" style="width: 60px;height: 30px;"
                                       @click="saveonSubmit('newcommonproject')">提交
                            </el-button>
                            <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                       @click="resetForm('newcommonproject');newdialogForm = false">取消
                            </el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </div>
    </el-dialog>
    <el-dialog title="建设单位信息搜索"  :before-close="handleDialogClose" :visible.sync="dialogFormVisible" width="70%">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-form-item label="建设单位名称">
                <el-input v-model="formInline.enterpriseName" placeholder="请输入建设单位名称"></el-input>
            </el-form-item>
            <el-form-item label="建设单位证件号码：">
                <el-input v-model="formInline.enterpriseIdNumber" placeholder="请输入证件号码"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button size="small" type="primary" @click="onSearch()" style="width: 60px;height: 30px;">查询</el-button>
            </el-form-item>
        </el-form>
        <el-table
                :data="companyInformation"
                highlight-current-row
                @current-change="selectCurrentChange"
                style="width: 100%">
            <el-table-column
                    fixed
                    prop="enterpriseName"
                    label="建设单位名称">
            </el-table-column>
            <el-table-column
                    prop="enterpriseIdNumber"
                    label="建设单位证件号码">
            </el-table-column>
            <el-table-column
                    prop="recordUnitUser"
                    label="联系人">
            </el-table-column>
            <el-table-column
                    prop="recordUnitPhone"
                    label="电话">
            </el-table-column>
            <el-table-column
                    prop="legalMan"
                    label="法人">
            </el-table-column>
        </el-table>
        <div style="overflow: hidden;">
            <div class="pagination">
                <el-pagination
                        @size-change="handleSizeChange1"
                        @current-change="handleCurrentChange1"
                        :current-page="currentPage1"
                        :page-sizes="[5, 10, 20, 40]"
                        :page-size="pagesize1"
                        background
                        layout="total, sizes,prev, pager, next"
                        :total="tableTotal1"
                        prev-text="上一页"
                        next-text="下一页">
                </el-pagination>
            </div>
        </div>
        <div slot="footer" class="dialog-footer" align="right">
            <el-button size="small" @click="dialogFormVisible = false;formInline.enterpriseName='';formInline.enterpriseIdNumber='';" style="width: 60px;height: 30px;">取 消</el-button>
            <el-button size="small" type="primary" @click="onAddInformation()" style="width: 60px;height: 30px;">确 定</el-button>
        </div>
    </el-dialog>
    <!--查看弹窗-->
    <el-dialog title="" :visible.sync="viewdialogForm" center fullscreen>
        <div style="margin-top: 10px;">
            <el-form :model="viewcommonproject" :rules="rules" ref="viewcommonproject" label-width="140px">
                <!--建设工程情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设工程情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目场址:" required label-width="110px">
							<span v-for="(item,index) in viewcommonproject.address">
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.provinceValue'" :rules="rules.provinceValue">
										<el-select v-model="item.provinceValue" placeholder="请选择省" @change="chooseProvince(item)" style="" disabled>
											<el-option	
									    		v-for="items in item.provinceData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">						
									<el-form-item :prop="'address.'+index+'.cityValue'" :rules="rules.cityValue">
										<el-select v-model="item.cityValue" placeholder="请选择市" @change="chooseCity(item)" style="" disabled>
											<el-option	
									    		v-for="items in item.cityData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.areaValue'" :rules="rules.areaValue">									
										<el-select v-model="item.areaValue" placeholder="请选择区、县" @change="chooseArea(item)" style="" disabled>
									    	<el-option
										        v-for="items in item.areaData"
										        :key="items.code"
										        :label="items.name"
										        :value="items.name">
										    </el-option>
									    </el-select>
								    </el-form-item>
							    </el-col>
							    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
							    <el-col :span="9">
								    <el-form-item>
								    	<el-input v-model="item.detailAddress" placeholder="填写详细地址" disabled></el-input>
								    </el-form-item>
							    </el-col>
							    <el-button v-if="index=='0'" size="mini" @click="addAddress()" icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline" style="margin-left: 8px;" disabled>跨省</el-button>
							    <el-button v-if="index!='0'" size="mini" @click="delAddress(index,item)" icon="el-icon-delete" style="margin-left: 8px;" disabled>删除</el-button>
							</span>	
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目地址:" prop="proAddress" label-width="110px">
                            <el-input v-model="viewcommonproject.proAddress" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="建设内容:" prop="proContent" label-width="110px" :required="reRemarkRequired">
                            <el-input
                                    disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入建设内容"
                                    maxlength="500"
                                    show-word-limit
                                    v-model="viewcommonproject.proContent">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--建设单位信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设单位信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="单位名称:" prop="unitName" label-width="90px">
                            <el-input v-model="viewcommonproject.unitName" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="联系人:" prop="unitUser" label-width="110px">
                            <el-input v-model="viewcommonproject.unitUser" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col span="5">
                        <el-form-item label="电话" prop="unitPhone" label-width="110px">
                            <el-input v-model="viewcommonproject.unitPhone" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="营业执照号码或三证合一证照号码:" prop="unitCode" label-width="240px">
                            <el-input v-model="viewcommonproject.unitCode" placeholder="" disabled></el-input>
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5">
                        <el-form-item label="法人:" prop="unitLegal" label-width="110px">
                            <el-input v-model="viewcommonproject.unitLegal" placeholder="" disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--一般工程抗震设防情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        一般工程抗震设防情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
                        <el-form-item label="抗震设防依据:" prop="earthquakeBasis" label-width="110px">
                            <el-select v-model="viewcommonproject.earthquakeBasis" placeholder="请选择抗震设防依据" disabled>
                                <el-option label="区划图" value="1"></el-option>
                                <el-option label="小区划" value="2"></el-option>
                                <el-option label="区域安全性评估" value="3"></el-option>
                                <el-option label="其他" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="10">
                        <el-form-item label="行业性质:" prop="industry" label-width="110px">
                            <el-select v-model="viewcommonproject.industry" placeholder="请选择行业性质" disabled>
                                <el-option label="城镇给排水、燃气、热力建筑" value="城镇给排水、燃气、热力建筑"></el-option>
                                <el-option label="电力建筑" value="电力建筑"></el-option>
                                <el-option label="交通运输建筑" value="交通运输建筑"></el-option>
                                <el-option label="邮电通信、广播电视建筑" value="邮电通信、广播电视建筑"></el-option>
                                <el-option label="公共建筑" value="公共建筑"></el-option>
                                <el-option label="居住建筑" value="居住建筑"></el-option>
                                <el-option label="工业建筑" value="工业建筑"></el-option>
                                <el-option label="仓库类建筑" value="仓库类建筑"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="22">
                        <el-form-item label="附件:" prop="fujian" label-width="110px">
                            <iframe id="viewFrame" style="overflow:hidden;height:200px;width:100%;" width="100%"
                                    frameBorder="0"
                                    :src="link"></iframe>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--项目填报信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        项目信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
                        <el-form-item label="填报日期:" prop="reCreateTime" label-width="110px">
                            <el-date-picker
                                    disabled
                                    v-model="viewcommonproject.reCreateTime"
                                    type="date"
                                    placeholder="选择填报日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报人员:" prop="reCreateUser" label-width="110px">
                            <el-input v-model="viewcommonproject.reCreateUser" placeholder="请输入填报人员"
                                      disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报部门:" prop="reCreateDepartment" label-width="110px">
                            <el-input v-model="viewcommonproject.reCreateDepartment" placeholder="请输入填报部门"
                                      disabled></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="备注:" prop="reRemark" label-width="110px">
                            <el-input
                                    disabled
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder=""
                                    maxlength="500"
                                    show-word-limit
                                    v-model="viewcommonproject.reRemark">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <div v-if="viewcommonproject.checkStatus==2||viewcommonproject.checkStatus==3">
                    <!--审定信息-->
                    <el-row>
                        <el-col :span="4" class="tab-title">
                            审定信息
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="6">
                            <el-form-item label="审定人员:" prop="checkUser" label-width="110px">
                                <el-input v-model="viewcommonproject.checkUser" placeholder="" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="审定人员机构:" prop="checkOrg">
                                <el-input v-model="viewcommonproject.checkOrg" placeholder="" disabled></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="6">
                            <el-form-item label="审定结果:" prop="checkResult" label-width="110px">
                                <el-select v-model="viewcommonproject.checkResult" placeholder="请选择" disabled>
                                    <el-option label="同意" value="1"></el-option>
                                    <el-option label="不同意" value="0"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="审定意见:" prop="checkView" label-width="110px">
                                <el-input
                                        disabled
                                        type="textarea"
                                        :autosize="{ minRows: 8, maxRows: 8}"
                                        placeholder="请输入内容"
                                        maxlength="500"
                                        show-word-limit
                                        v-model="viewcommonproject.checkView">
                                </el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </div>
                <el-row>
                    <el-col :span="22">
                        <div style="float:right;">
                            <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                       @click="viewdialogForm = false">关闭
                            </el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </div>
    </el-dialog>

    <!--编辑修改-->
    <el-dialog title="" :visible.sync="editdialogForm" center fullscreen>
        <div style="margin-top: 10px;">
            <el-form :model="editcommonproject" :rules="rules" ref="editcommonproject" label-width="140px">
                <!--建设工程情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设工程情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目名称:" prop="noaddress.proName" :rules="rules.proName" label-width="110px">
                            <el-input v-model="editcommonproject.noaddress.proName" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="项目场址:" required label-width="110px">
							<span v-for="(item,index) in editcommonproject.address">
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.provinceValue'" :rules="rules.provinceValue">
										<el-select v-model="item.provinceValue" placeholder="请选择省" @change="chooseProvince(item)" style="">
											<el-option	
									    		v-for="items in item.provinceData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">						
									<el-form-item :prop="'address.'+index+'.cityValue'" :rules="rules.cityValue">
										<el-select v-model="item.cityValue" placeholder="请选择市" @change="chooseCity(item)" style="">
											<el-option	
									    		v-for="items in item.cityData"
									    		:key="items.code"
									    		:label="items.name"
									    		:value="items.name">
											</el-option>
										</el-select>
									</el-form-item>
								</el-col>
								<el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
								<el-col :span="4">
									<el-form-item :prop="'address.'+index+'.areaValue'" :rules="rules.areaValue">									
										<el-select v-model="item.areaValue" placeholder="请选择区、县" @change="chooseArea(item)" style="">
									    	<el-option
										        v-for="items in item.areaData"
										        :key="items.code"
										        :label="items.name"
										        :value="items.name">
										    </el-option>
									    </el-select>
								    </el-form-item>
							    </el-col>
							    <el-col span="0.5" style="color: rgb(192, 204, 218);text-align: center;">
	                                <span>—</span>
	                            </el-col>
							    <el-col :span="9">
								    <el-form-item>
								    	<el-input v-model="item.detailAddress" placeholder="填写详细地址" ></el-input>
								    </el-form-item>
							    </el-col>
							    <el-button v-if="index=='0'" size="mini" @click="addAddress()" icon="el-icon-circle-plus-outline" icon="el-icon-circle-plus-outline" style="margin-left: 8px;">跨省</el-button>
							    <el-button v-if="index!='0'" size="mini" @click="delAddress(index,item)" icon="el-icon-delete" style="margin-left: 8px;">删除</el-button>
							</span>	
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="建设内容:" prop="noaddress.proContent" :rules="rules.proContent" label-width="110px" :required="reRemarkRequired">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入建设内容"
                                    maxlength="500"
                                    show-word-limit
                                    v-model="editcommonproject.noaddress.proContent">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--建设单位信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        建设单位信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="单位名称:" prop="noaddress.unitName" :rules="rules.unitName" label-width="90px">
                            <el-input v-model="editcommonproject.noaddress.unitName" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="联系人:" prop="noaddress.unitUser" :rules="rules.unitUser" label-width="110px">
                            <el-input v-model="editcommonproject.noaddress.unitUser" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col span="5">
                        <el-form-item label="电话" prop="noaddress.unitPhone" :rules="rules.unitPhone" label-width="110px">
                            <el-input v-model="editcommonproject.noaddress.unitPhone" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="18">
                        <el-form-item label="营业执照号码或三证合一证照号码:" prop="noaddress.unitCode" :rules="rules.reCreateDepartment" label-width="240px">
                            <el-input v-model="editcommonproject.noaddress.unitCode" placeholder=""></el-input>
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="5">
                        <el-form-item label="法人:" prop="noaddress.unitLegal" :rules="rules.unitLegal" label-width="110px">
                            <el-input v-model="editcommonproject.noaddress.unitLegal" placeholder=""></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--一般工程抗震设防情况-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        一般工程抗震设防情况
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="抗震设防依据:" prop="noaddress.earthquakeBasis" :rules="rules.earthquakeBasis" label-width="110px">
                            <el-select v-model="editcommonproject.noaddress.earthquakeBasis" placeholder="请选择抗震设防依据" style="width : 80%;">
                                <el-option label="区划图" value="1"></el-option>
                                <el-option label="小区划" value="2"></el-option>
                                <el-option label="区域安全性评估" value="3"></el-option>
                                <el-option label="其他" value="4"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="行业性质:" prop="noaddress.industry" label-width="110px" :rules="rules.industry">
                            <el-select v-model="editcommonproject.noaddress.industry" placeholder="请选择行业性质" style="width : 80%;">
                                <el-option label="城镇给排水、燃气、热力建筑" value="城镇给排水、燃气、热力建筑"></el-option>
                                <el-option label="电力建筑" value="电力建筑"></el-option>
                                <el-option label="交通运输建筑" value="交通运输建筑"></el-option>
                                <el-option label="邮电通信、广播电视建筑" value="邮电通信、广播电视建筑"></el-option>
                                <el-option label="公共建筑" value="公共建筑"></el-option>
                                <el-option label="居住建筑" value="居住建筑"></el-option>
                                <el-option label="工业建筑" value="工业建筑"></el-option>
                                <el-option label="仓库类建筑" value="仓库类建筑"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="22">
                        <el-form-item label="附件:" prop="fujian" label-width="110px">
                            <iframe id="editFrame" style="overflow:hidden;height:200px;width:100%;" width="100%"
                                    frameBorder="0"
                                    :src="link"></iframe>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--项目填报信息-->
                <el-row>
                    <el-col :span="4" class="tab-title">
                        项目信息
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="6">
                        <el-form-item label="填报日期:" prop="noaddress.reCreateTime" :rules="rules.reCreateTime" label-width="110px">
                            <el-date-picker
                                    v-model="editcommonproject.noaddress.reCreateTime"
                                    type="date"
                                    value-format="yyyy-MM-dd"
                                    placeholder="选择填报日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报人员:" prop="noaddress.reCreateUser" :rules="rules.reCreateUser" label-width="110px">
                            <el-input v-model="editcommonproject.noaddress.reCreateUser" placeholder="请输入填报人员"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="6">
                        <el-form-item label="填报部门:" prop="noaddress.reCreateDepartment" :rules="rules.reCreateDepartment" label-width="110px">
                            <el-input v-model="editcommonproject.noaddress.reCreateDepartment" placeholder="请输入填报部门"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="24">
                        <el-form-item label="备注:" prop="reRemark" label-width="110px">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder=""
                                    maxlength="500"
                                    show-word-limit
                                    v-model="editcommonproject.noaddress.reRemark">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <!--修改无审定信息，删掉审定框-->
                <el-row>
                    <el-col :span="22">
                        <div style="float:right;">
                            <el-button type="primary" size="small" style="width: 60px;height: 30px;"
                                       @click="editonSubmit('editcommonproject')">修改
                            </el-button>
                            <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                       @click="resetForm('editcommonproject');editdialogForm = false">取消
                            </el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </div>
    </el-dialog>
    <!-- 拟制公告 -->
    <el-dialog title="" :visible.sync="dialogGongGaoForm" center fullscreen>
        <div style="margin-top: 10px;">
            <el-form :model="gonggao" :rules="gonggaorules" ref="gonggao" label-width="140px">
                <!--企业信用信息拟制公告表-->
                <el-row>
                    <el-col :span="5" class="tab-title">
                        一般工程抗震设防审查情况公告表
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="20">
                        <el-form-item label="标题:" prop="title" label-width="120px">
                            <el-input v-model="gonggao.title"  placeholder="" maxlength="500" show-word-limit></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="20">
                        <el-form-item label="发文字号:" prop="releaseNumber" label-width="120px">
                            <el-input v-model="gonggao.releaseNumber" placeholder="" maxlength="500" show-word-limit></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row class="companycredit_publicstate">
                    <el-col :span="8">
                        <el-form-item label="公布类别:" prop="isPublic" label-width="120px">
                            <el-radio-group disabled v-model="gonggao.isPublic">
                                <el-radio label="0">公示通报</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="法律法规类别:" prop="lawsType" label-width="120px">
                            <el-input v-model="gonggao.lawsType"  placeholder="" maxlength="50" show-word-limit></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row class="companycredit_publicstate">
					<el-col :span="8">
						<el-form-item label="公开状态:" prop="publicState" label-width="120px">
							<el-radio-group v-model="gonggao.publicState">
								<el-radio :label="0">未公开</el-radio>
								<el-radio :label="1">公开</el-radio>
							</el-radio-group>
						</el-form-item>
					</el-col>
                    <el-col :span="14">
                        <el-form-item label="公开地址类型:" prop="publicType" label-width="120px">
                            <el-radio-group v-model="gonggao.publicType">
                                <el-radio :label="0">服务门户</el-radio>
                                <el-radio :label="1">工作门户</el-radio>
                                <el-radio :label="2">服务门户和工作门户</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="8">
                        <el-form-item label="施行日期:" prop="dateImplementation" label-width="120px">
                            <el-date-picker type="date" v-model="gonggao.dateImplementation"  placeholder="请选择施行日期">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="关键字:" prop="keyword" label-width="120px">
                            <el-input v-model="gonggao.keyword" placeholder="" maxlength="50" show-word-limit></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="margin: 0 0 20px;">
                    <el-col :span="20">
                        <el-form-item label="内容" prop="attachContent" label-width="120px">
                            <el-input
                                    type="textarea"
                                    :autosize="{ minRows: 8, maxRows: 8}"
                                    placeholder="请输入内容"
                                    maxlength="500"
                                    show-word-limit
                                    v-model="gonggao.attachContent">
                            </el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row style="margin: 0 0 20px;">
                    <el-col :span="2" class="tab"
                            style="width: 120px;text-align: center;height: 30px;line-height: 30px;">
                        <span>附加内容:</span>
                    </el-col>
                    <el-col :span="12" style="border: 1px solid #ddd;">
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>项目名称</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.proName }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>项目地址</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.proAddress }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>建设内容</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.proContent }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>单位名称</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.unitName }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>联系人</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.unitUser }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>电话</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.unitPhone }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>营业执照号码或三证合一证照号码</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.unitCode }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>法人</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.unitLegal }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>抗震设防依据</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <!--<span style="padding-left: 15px;">{{ viewcommonproject.earthquakeBasis }}</span>-->
                                <span v-if="viewcommonproject.earthquakeBasis == 1"
                                      style="padding-left: 15px;">区划图</span>
                                <span v-if="viewcommonproject.earthquakeBasis == 2"
                                      style="padding-left: 15px;">小区划</span>
                                <span v-if="viewcommonproject.earthquakeBasis == 3"
                                      style="padding-left: 15px;">区域安全性评估</span>
                                <span v-if="viewcommonproject.earthquakeBasis == 4"
                                      style="padding-left: 15px;">其他</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>填报日期</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.reCreateTime }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>填报人员</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.reCreateUser }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>填报部门</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.reCreateDepartment }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>审定人员</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.checkUser }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>审定人员机构</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.checkOrg }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>审定结果</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.checkResult }}</span>
                            </el-col>
                        </el-row>
                        <el-row class="border_btm">
                            <el-col :span="4" class="border_right" style="padding: 22px 0px;text-align: center;">
                                <span>审定意见</span>
                            </el-col>
                            <el-col :span="18" style="padding: 22px 0px;">
                                <span style="padding-left: 15px;">{{ viewcommonproject.checkView }}</span>
                            </el-col>
                        </el-row>
                    </el-col>
                </el-row>
                <el-row>
					<el-col :span="24">
						<el-form-item label="附件:" label-width="110px">
							<iframe width="100%"  style="height: 200px;border: none;"   :src="link"></iframe>
						</el-form-item>
					</el-col>
				</el-row>
                <el-row>
                    <el-col :span="22">
                        <div style="float:right;">
                            <el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="release()">
                                发布
                            </el-button>
                            <el-button type="info" size="small" style="width: 60px;height: 30px;"
                                       @click="dialogGongGaoForm = false;clearForm()">取消
                            </el-button>
                        </div>
                    </el-col>
                </el-row>
            </el-form>
        </div>
    </el-dialog>
       
	<!-- 查看公告 -->
	<el-dialog title="" :visible.sync="dialogGongGaoViewForm" center fullscreen>
		<el-row>
			<el-col :span="16" :offset="4">
				<div style="margin-top: 10px;">
					<el-form :model="gonggao" :rules="rules" ref="gonggao">
						<!--公开公告信息表-->
						<el-row style="margin-bottom: 10px;">
							<el-col>
								<h4 style="margin-top:10px;font-size: 40px;text-align: center;">{{ gonggao.title }}</h4>
							</el-col>
						</el-row>
						<el-row style="margin-bottom: 10px;padding-bottom: 10px;font-size: 24px;border-bottom: 1px solid #ddd;text-align: center;">
                            <el-col :span="5">
                                <span>{{ gonggao.createUser }}</span>
                            </el-col>
                            <el-col span="4">
                                <span>{{ gonggao.inputenTime }}</span>
                            </el-col>
                            <el-col :span="6">
                                <div style="float:right;">
                                    <span v-if="(gonggao.publicType == 0) ? true : false">服务门户</span>
                                    <span v-if="(gonggao.publicType == 1) ? true : false">工作门户</span>
                                    <span v-if="(gonggao.publicType == 2) ? true : false">服务门户和工作门户</span>
                                </div>
                            </el-col>
                            <el-col :span="4">
								<div style="float:right;">
									<span v-if="(gonggao.publicState == 0) ? true : false">未公开</span>
									<span v-if="(gonggao.publicState != 0) ? true : false">公开</span>
								</div>
							</el-col>
                            <el-col :span="5">
                                <div style="float:right;">
                                    <span v-if="(gonggao.isPublic == 0) ? true : false">公示通报</span>
                                    <span v-if="(gonggao.isPublic == 1) ? true : false">标准规范</span>
                                </div>
                            </el-col>
						</el-row>
						<el-row style="margin: 40px 0;font-size: 24px;">
							<el-col :span="20" :offset="2">
								<!--{{ gonggao.attachContent }}-->
                                <span v-html="gonggao.attachContent"></span>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="24">
								<el-form-item label="" >
									<iframe width="100%" scrolling="no" style="border: none;"   :src="link"></iframe>
								</el-form-item>
							</el-col>
						</el-row>
						<!--<el-row>
							<el-col>
								<div style="float:right;">
									<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="clearForm();dialogGongGaoViewForm = false;">关闭</el-button>
								</div>
							</el-col>
						</el-row>-->
					</el-form>
				</div>
			</el-col>
		</el-row>
	</el-dialog>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data() {
            //验证营业执照或三证合一
            let checkICard= (rule, value, callback)=>{
                if(!checkCard(value)){
                    callback(new Error('请输入非负数数值'));
                }else {
                    callback();
                }
            };
            return {
                uuid: '',
                link: '', // 附件iframe
                currentPage: 1, //默认显示页面为1
                pagesize: 10, // 每页的数据条数
                currentPage1: 1, //默认显示页面为1
                pagesize1: 5, // 每页的数据条数
                newdialogForm: false,//新增申请弹窗
                viewdialogForm: false,//查看详情弹窗
                editdialogForm: false,//编辑修改弹窗
                checkdialogForm: false,//审定弹窗
                dialogGongGaoForm: false, //拟制公告弹窗
                dialogGongGaoViewForm: false, // 查看公告弹窗
                dialogFormVisible: false,
                tableTotal: '',//条数
                tableTotal1: '',//条数
                companyInformation: [],
                currentRow: null,
 
                // 用户登录信息
                userName: '', // 用户登录名称
                orgName: '', // 组织名称对应项目地址
                orgLevel: '', // 组织等级对应 地市级、省级、中国级地震局用户
                formInline: {
                    enterpriseName: '',
                    enterpriseIdNumber:''
                },
                gonggao: {
                    publicId: '',
                    relationId: '',
                    createUser: '',
                    inputenTime: '',
                    publicState: '',
                    publicType: '',
                    title: '', // 拟制公告标题
                    attachContent: '', // 内容
                    isPublic : '0',
                    dateImplementation:'',
                    lawsType:'',
                    releaseNumber:'',
                    keyword:''
                },
                selectForm: {
                    proName: '',
                    unitName: '',
                    reCreateDepartment: '',
                    checkStatus: '',
                    reportStatus: '',
                    reCreateUser: ''
                },
                commonproject: {
                    proName: '',
                    proAddress: '',
                    proContent: '',
                    unitName: '',
                    unitUser: '',
                    unitPhone: '',
                    unitCode: '',
                    unitLegal: '',
                    earthquakeBasis: '',
                    reCreateTime: '',
                    reCreateUser: '',
                    reCreateDepartment: '',
                    reRemark: '',
                    checkUser: '',
                    checkOrg: '',
                    checkResult: '',
                    checkView: '',
                    // 新增 状态
                    checkStatus: ''
                },
                newcommonproject: {
                    reId: '',
                    proName: '',
                    address:[{
	                	provinceValue:'',
		                cityValue:'',
		                areaValue:'',
		                detailAddress:'',
	                	provinceData:[],
	                	cityData:[],
	                	areaData:[]
	                }],
                    proAddress: '',
                    proContent: '',
                    unitName: '',
                    unitUser: '',
                    unitPhone: '',
                    unitCode: '',
                    unitLegal: '',
                    earthquakeBasis: '',
                    reCreateTime: '',
                    reCreateUser: '',
                    reCreateDepartment: '',
                    reRemark: '',
                    checkUser: '',
                    checkOrg: '',
                    checkResult: '',
                    checkView: '',
                    checkStatus: '',
                    orgLevel: '', // 组织等级,新增时设置组织等级
                    industry : '' // 行业性质
                },
                viewcommonproject: {
                    proName: '',
                    address:[{
	                	provinceValue:'',
		                cityValue:'',
		                areaValue:'',
		                detailAddress:'',
	                	provinceData:[],
	                	cityData:[],
	                	areaData:[]
	                }],
                    proAddress: '',
                    proContent: '',
                    unitName: '',
                    unitUser: '',
                    unitPhone: '',
                    unitCode: '',
                    unitLegal: '',
                    earthquakeBasis: '',
                    reCreateTime: '',
                    reCreateUser: '',
                    reCreateDepartment: '',
                    reRemark: '',
                    checkUser: '',
                    checkOrg: '',
                    checkResult: '',
                    checkView: '',
                    checkStatus: '',
                    industry : '' // 行业性质
                },
                editcommonproject: {
                	noaddress:{
                		proName: '',                    
	                    proAddress: '',
	                    proContent: '',
	                    unitName: '',
	                    unitUser: '',
	                    unitPhone: '',
	                    unitCode: '',
	                    unitLegal: '',
	                    earthquakeBasis: '',
	                    reCreateTime: '',
	                    reCreateUser: '',
	                    reCreateDepartment: '',
	                    reRemark: '',
	                    checkUser: '',
	                    checkOrg: '',
	                    checkResult: '',
	                    checkView: '',
	                    checkStatus: '',
                        industry : '' // 行业性质
                	},                    
                    address:[{
	                	provinceValue:'',
		                cityValue:'',
		                areaValue:'',
		                detailAddress:'',
	                	provinceData:[],
	                	cityData:[],
	                	areaData:[]
	                }]
                },
                rules: {
                    proName: [{
                        required: true,
                        message: '请输入项目名称',
                        trigger: 'blur'
                    }],
                    provinceValue: [{
                        required: true,
                        message: '请选择省',
                        trigger: 'change'
                    }],
                    cityValue: [{
                        required: true,
                        message: '请选择市',
                        trigger: 'change'
                    }],
                    areaValue: [{
                        required: true,
                        message: '请选择区、县',
                        trigger: 'change'
                    }],             
                    proAddress: [{
                        required: true,
                        message: '请输入项目地址',
                        trigger: 'blur'
                    }],
                    proContent: [{
                        required: true,
                        message: '请输入建设内容',
                        trigger: 'blur'
                    }],
                    unitName: [{
                        required: true,
                        message: '请输入单位名称',
                        trigger: 'blur'
                    }],
                    unitUser: [{
                        required: true,
                        message: '请输入联系人',
                        trigger: 'blur'
                    }],
                    unitPhone: [{
                        required: true,
                        message: '请输入电话号码',
                        trigger: 'blur'
                    },
                    {
                        validator: checkPhTel,
                        message: '请输入正确的手机号或固话',
                        trigger: 'blur'
                    }],
                    unitCode: [{
                        required: true,
                        message: '请输入营业执照号码或三证合一证照号码',
                        trigger: 'blur'
                    }/*,{
                        validator: checkICard,
                        message: '请输入15位或18位的营业执照号码或三证合一证照号码',
                        trigger: 'blur'
                    }*/],
                    unitLegal: [{
                        required: true,
                        message: '请输入法人',
                        trigger: 'blur'
                    }],
                    earthquakeBasis: [{
                        required: true,
                        message: '请输入抗震设防依据',
                        trigger: 'change'
                    }],
                    industry : [{
                        required : true,
                        message : '请选择行业性质',
                        trigger : 'change'
                    }],
                    /*fujian: [{
                        required: true,
                        message: '请输入附件',
                        trigger: 'blur'
                    }],*/
                    reCreateTime: [{
                        required: true,
                        message: '请输入填报日期',
                        trigger: 'blur'
                    }],
                    reCreateUser: [{
                        required: true,
                        message: '请输入填报人员',
                        trigger: 'blur'
                    }],
                    reCreateDepartment: [{
                        required: true,
                        message: '请输入填报部门',
                        trigger: 'blur'
                    }],
                    reRemark: [{
                        required: false,
                        message: '请输入备注',
                        trigger: 'blur'
                    }],
                    checkUser: [{
                        required: true,
                        message: '请输入审定人员',
                        trigger: 'blur'
                    }],
                    checkOrg: [{
                        required: true,
                        message: '请输入审定人员机构',
                        trigger: 'blur'
                    }],
                    checkResult: [{
                        required: true,
                        message: '请输入审定结果',
                        trigger: 'blur'
                    }],
                    checkView: [{
                        required: true,
                        message: '请输入审定意见',
                        trigger: 'blur'
                    }],
                    checkStatus: [{
                        required: true,
                        message: '请输入审定结果',
                        trigger: 'blur'
                    }],
                },
                gonggaorules: {
                    dateImplementation: [{
                        required: true,
                        message: '请选择施行日期',
                        trigger: 'blur'
                    }],
                    releaseNumber: [{
                        required: true,
                        message: '请输入发文字号',
                        trigger: 'blur'
                    }],
                    lawsType: [{
                        required: true,
                        message: '请输入法律法规类别',
                        trigger: 'blur'
                    }],
                    title: [{
                        required: true,
                        message: '请输入标题',
                        trigger: 'blur'
                    }],
                    createUser: [{
                        required: true,
                        message: '请输入创建人',
                        trigger: 'blur'
                    }],
                    inputenTime: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    attachContent: [{
                        required: true,
                        message: '请输入内容',
                        trigger: 'blur'
                    }],
                    publicType: [{
                        required: true,
                        message: '请输入公开地址类型',
                        trigger: 'blur'
                    }],
                    publicState: [{
                        required: true,
                        message: '请输入公共状态',
                        trigger: 'blur'
                    }],
                    enclosure: [{
                        required: false,
                        message: '',
                        trigger: 'blur'
                    }],
                    isPublic : [{
                        required : true,
                        message : '请选择发布类别',
                        trigger: 'blur'
                    }]
                },
            }

        },
        created() {
            // 地址Json树导入
            axios.get('../../json/ChinaCity.json').then(res=>{
				this.newcommonproject.address.forEach((item, index) => {
                    item.provinceData = res.data;
                });
                this.editcommonproject.address.forEach((item, index) => {
                    item.provinceData = res.data;
                });
			}).catch(e => {
				this.$message.error("网络连接超时");
		   	})
            // 获取登录用户信息
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            this.orgLevel = userInfo.orgLevel;
            // 中国地震局 ==> 中国, 山东省-济南市地震局 ==> 山东省-济南市
            this.orgName = userInfo.orgName.replace("地震局", "");
            this.userName = userInfo.loginName;
            console.log("用户名：" + this.userName);
            console.log("组织等级：" + this.orgLevel);
            console.log("组织名称：" + this.orgName);
        },
        mounted() {
            this.getData();
        },
        methods: {
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage - 1;
                axios({
                    method: 'get',
                    url: '/dzjap/generecord/getPage',
                    params: {
                        proName: this.selectForm.proName,
                        unitName: this.selectForm.unitName,
                        reCreateUser: this.selectForm.reCreateUser,
                        checkStatus: this.selectForm.checkStatus,
                        reportStatus: this.selectForm.reportStatus,
                        reCreateDepartment: this.selectForm.reCreateDepartment,
                        proAddress: this.orgName,
                        orgLevel: this.orgLevel,
                        pageSize: pagesize,
                        pageNo: pageno
                    }
                })
                    .then(response => {
                        console.log(response)
                        if (response.data.code == 200) {
                            console.log(response.data.data.results)
                            this.commonproject = response.data.data.results;
                            this.tableTotal = response.data.data.total;
                        } else {
                            this.$message.error(response.data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            // 搜索栏查询
            searchForm(selectForm) {
                var pagesize = this.pagesize;
                var pageno = this.currentPage - 1;
                console.log(this.selectForm.reCreateUser);
                axios({
                    method: 'get',
                    url: '/dzjap/generecord/getPage',
                    params: {
                        proName: this.selectForm.proName,
                        unitName: this.selectForm.unitName,
                        checkStatus: this.selectForm.checkStatus,
                        reportStatus: this.selectForm.reportStatus,
                        reCreateUser: this.selectForm.reCreateUser,
                        reCreateDepartment: this.selectForm.reCreateDepartment,
                        proAddress: this.orgName,
                        orgLevel: this.orgLevel,
                        pageSize: pagesize,
                        pageNo: pageno
                    }
                })
                    .then(response => {
                        console.log(response)
                        if (response.data.code == 200) {
                            console.log(response.data.data.results)
                            this.commonproject = response.data.data.results;
                            this.tableTotal = response.data.data.total;
                        } else {
                            this.$message.error(response.data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            resetForm(formName) {
                this.$refs[formName].resetFields();
            },
            //每页下拉显示数据
            handleSizeChange: function (size) {
                this.pagesize = size;
                this.getData();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange: function (currentPage) {
                this.currentPage = currentPage;
                this.getData();
                /*console.log(this.currentPage) */
            },
            // 获取UUID的方法
            getUuid() {
                axios({
                    method: 'get',
                    url: '/dzjap/uuid/getUuid',
                })
                    .then(response => {
                        console.log(response);
                        if (response.data.code == 200) {
                            this.uuid = response.data.data;
                            this.link = "../upload/annex.html?uuid=" + this.uuid + "&flag=1";
                            console.log(this.uuid);
                        } else {
                            this.$message.error(response.data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
            // 获取年月日
            getCurDate(){
                let date = new Date();
                let y = date.getFullYear();
                let MM = date.getMonth() + 1;
                MM = MM < 10 ? ('0' + MM) : MM;
                let d = date.getDate();
                d = d < 10 ? ('0' + d) : d;
                var curDate =  y + '-' + MM + '-' + d;
                return curDate;
            },
            // 企业信息搜索
            onSearch(){
                axios({
                    method: 'get',
                    url: '/dzjap/constr/listcontr',
                    params: {
                        pageSize:this.pagesize1,
                        pageNo:this.currentPage1,
                        enterpriseName:this.formInline.enterpriseName,
                        enterpriseIdNumber:this.formInline.enterpriseIdNumber
                    }
                })
                .then(response => {
                    let data=response.data.data.results;
                    this.tableTotal1 = response.data.data.total;
                    this.companyInformation=data;
                    console.log(this.companyInformation)
                });
            },
            /* 搜索结束，回显数据 */
            onAddInformation(){
                this.dialogFormVisible = false; // 关dialog
                this.formInline.enterpriseName='';
                this.formInline.enterpriseIdNumber='';
                // 回显数据
                const comInformation = this.currentRow;
                console.log(comInformation)
                this.newcommonproject.unitName = comInformation.enterpriseName;
                this.newcommonproject.unitCode = comInformation.enterpriseIdNumber;
                this.newcommonproject.unitUser = comInformation.recordUnitUser;
                this.newcommonproject.unitPhone = comInformation.recordUnitPhone;
				this.newcommonproject.unitLegal = comInformation.legalMan;

            },
            /* 单选搜索表单 */
            selectCurrentChange(val){
                this.currentRow = val;
                console.log(val)
            },
            // 关闭方法
            handleDialogClose(){
                this.dialogFormVisible = false;
                this.formInline.enterpriseName='';
                this.formInline.enterpriseIdNumber='';
            },
            handleSizeChange1(size) {
                this.pagesize1 = size;
                this.onSearch();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange1(currentPage) {
                this.currentPage1 = currentPage;
                this.onSearch();
            },
            // 点击新增按钮进入新增页面
            apply() {
                this.newdialogForm = true;
                this.cancel();
                this.getUuid();
                axios.get('../../json/ChinaCity.json').then(res=>{
				this.newcommonproject.address.forEach((item, index) => {
                    item.provinceData = res.data;
                });
				}).catch(e => {
					this.$message.error("网络连接超时");
			    })    
                // 新增时回显用户的信息，即系统带出
                this.newcommonproject.reCreateUser = this.userName;
                this.newcommonproject.reCreateDepartment = this.orgName + '地震局';
                this.newcommonproject.reCreateTime = this.getCurDate();                
            },
            // 新增页面暂存按钮
            newonSubmit(formName) {
                this.newcommonproject.reId = this.uuid;
                // 地市级用户新增设置组织等级为2
                this.newcommonproject.orgLevel = '2';
                if(this.newcommonproject.address.length == 1){
        			this.newcommonproject.proAddress = this.newcommonproject.address[0].provinceValue +'-'+this.newcommonproject.address[0].cityValue+'-'+this.newcommonproject.address[0].areaValue+'-'+this.newcommonproject.address[0].detailAddress;
        		}else{
        			this.newcommonproject.proAddress = this.newcommonproject.address[0].provinceValue +'-'+this.newcommonproject.address[0].cityValue+'-'+this.newcommonproject.address[0].areaValue+'-'+this.newcommonproject.address[0].detailAddress;
        			for(let i=1;i<this.newcommonproject.address.length;i++){        				
        				this.newcommonproject.proAddress = this.newcommonproject.proAddress +','+this.newcommonproject.address[i].provinceValue +'-'+this.newcommonproject.address[i].cityValue+'-'+this.newcommonproject.address[i].areaValue+'-'+this.newcommonproject.address[i].detailAddress;
        			}        		
        		}
        		console.log(this.newcommonproject.proAddress)
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        axios({
                            method: 'post',
                            url: '/dzjap/generecord/zcadd',
                            data: this.newcommonproject
                        }).then((res) => {
                            console.log(res);
                            if (res.data.code == 200) {
                                // 提交成功将要执行的代码
                                // this.commonproject.push(this.newcommonproject);
                                this.getData();
                                this.$message({
                                    message: '暂存成功',
                                    type: 'success'
                                });
                                this.newdialogForm = false;
                                // 表单置空
                                this.newcommonproject = {
				                    reId: '',
				                    proName: '',
				                    address:[{
					                	provinceValue:'',
						                cityValue:'',
						                areaValue:'',
						                detailAddress:'',
					                	provinceData:[],
					                	cityData:[],
					                	areaData:[]
					                }],
				                    proAddress: '',
				                    proContent: '',
				                    unitName: '',
				                    unitUser: '',
				                    unitPhone: '',
				                    unitCode: '',
				                    unitLegal: '',
				                    earthquakeBasis: '',
				                    reCreateTime: '',
				                    reCreateUser: '',
				                    reCreateDepartment: '',
				                    reRemark: '',
				                    checkUser: '',
				                    checkOrg: '',
				                    checkResult: '',
				                    checkView: '',
				                    checkStatus: '',
				                    orgLevel: '', // 组织等级,新增时设置组织等级
                                    industry: ''
				                }
                            }
                        })
                    } else {
                        console.log("error!!");
                        return false;
                    }
                });
            },
            // 新增页面 提交按钮：存库并且审定状态设置为1：已提交
            saveonSubmit(formName) {
                this.newcommonproject.reId = this.uuid;
                // 地市级用户新增设置组织等级为2
                this.newcommonproject.orgLevel = '2';
                if(this.newcommonproject.address.length == 1){
        			this.newcommonproject.proAddress = this.newcommonproject.address[0].provinceValue +'-'+this.newcommonproject.address[0].cityValue+'-'+this.newcommonproject.address[0].areaValue+'-'+this.newcommonproject.address[0].detailAddress;
        		}else{
        			this.newcommonproject.proAddress = this.newcommonproject.address[0].provinceValue +'-'+this.newcommonproject.address[0].cityValue+'-'+this.newcommonproject.address[0].areaValue+'-'+this.newcommonproject.address[0].detailAddress;
        			for(let i=1;i<this.newcommonproject.address.length;i++){        				
        				this.newcommonproject.proAddress = this.newcommonproject.proAddress +','+this.newcommonproject.address[i].provinceValue +'-'+this.newcommonproject.address[i].cityValue+'-'+this.newcommonproject.address[i].areaValue+'-'+this.newcommonproject.address[i].detailAddress;
        			}        		
        		}
        		console.log(this.newcommonproject.proAddress)
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        axios({
                            method: 'post',
                            url: '/dzjap/generecord/add',
                            data: this.newcommonproject
                        }).then((res) => {
                            console.log(res);
                            if (res.data.code == 200) {
                                this.getData();
                                this.$message({
                                    message: '提交成功',
                                    type: 'success'
                                });
                                // 表单置空
                                this.provinceValue = '';
                                this.cityValue = '';
                                this.areaValue = '';
                                this.newcommonproject = {
				                    reId: '',
				                    proName: '',
				                    address:[{
					                	provinceValue:'',
						                cityValue:'',
						                areaValue:'',
						                detailAddress:'',
					                	provinceData:[],
					                	cityData:[],
					                	areaData:[]
					                }],
				                    proAddress: '',
				                    proContent: '',
				                    unitName: '',
				                    unitUser: '',
				                    unitPhone: '',
				                    unitCode: '',
				                    unitLegal: '',
				                    earthquakeBasis: '',
				                    reCreateTime: '',
				                    reCreateUser: '',
				                    reCreateDepartment: '',
				                    reRemark: '',
				                    checkUser: '',
				                    checkOrg: '',
				                    checkResult: '',
				                    checkView: '',
				                    checkStatus: '',
				                    orgLevel: '', // 组织等级,新增时设置组织等级
                                    industry: ''
                				}
                                // 关闭窗口
                                this.newdialogForm = false;
                            }
                        })
                    } else {
                        this.$message({
                            message: 'error!',
                            type: 'error'
                        });
                        return false;
                    }
                });
            },
            cancel(){
            	this.newcommonproject = {
                    reId: '',
                    proName: '',
                    address:[{
	                	provinceValue:'',
		                cityValue:'',
		                areaValue:'',
		                detailAddress:'',
	                	provinceData:[],
	                	cityData:[],
	                	areaData:[]
	                }],
                    proAddress: '',
                    proContent: '',
                    unitName: '',
                    unitUser: '',
                    unitPhone: '',
                    unitCode: '',
                    unitLegal: '',
                    earthquakeBasis: '',
                    reCreateTime: '',
                    reCreateUser: '',
                    reCreateDepartment: '',
                    reRemark: '',
                    checkUser: '',
                    checkOrg: '',
                    checkResult: '',
                    checkView: '',
                    checkStatus: '',
                    orgLevel: '', // 组织等级,新增时设置组织等级
                    industry: ''
                }
            },
            // 查看按钮
            view(index, row) {
                this.viewcommonproject = row;
                this.uuid = row.reId;
                this.link = "../upload/annex.html?uuid=" + this.uuid + '&flag=0';
                var arr = row.proAddress.split(",");
                this.viewcommonproject.address=[];                
                for(let i=0;i<arr.length;i++){
                	this.viewcommonproject.address.push({
                		provinceValue:arr[i].split("-")[0],
		                cityValue:arr[i].split("-")[1],
		                areaValue:arr[i].split("-")[2],
		                detailAddress:arr[i].split("-")[3],
		                provinceData:[],
                		cityData:[],
                		areaData:[]
                	})
                }
            },
            // 修改按钮
            edit(index, row) {
                this.editdialogForm = true;
                this.editcommonproject.noaddress = row;
                console.log(row.reId);
                this.uuid = row.reId;
                this.link = "../upload/annex.html?uuid=" + this.uuid + '&flag=1';
                // 项目厂址回显
                var arr = row.proAddress.split(",");
				this.editcommonproject.address=[]; 
                for(let i=0;i<arr.length;i++){
                	this.editcommonproject.address.push({
                		provinceValue:arr[i].split("-")[0],
		                cityValue:arr[i].split("-")[1],
		                areaValue:arr[i].split("-")[2],
		                detailAddress:arr[i].split("-")[3],
		                provinceData:[],
                		cityData:[],
                		areaData:[]
                	})
                }                
                axios.get('../../json/ChinaCity.json').then(res=>{               	
					this.editcommonproject.address.forEach((item, index) => {
	                    item.provinceData = res.data;
	                    item.provinceData.map(e=>{//遍历数据
		                    if( item.provinceValue == e.name){
			                    item.cityData = e.cityList;
			                    item.cityData.map(e=>{//遍历数据
				                    if( item.cityValue == e.name){
					                    item.areaData = e.areaList;
					                    return;
					                }
					            })
			                    return;
			                }
			            })
	                })
				}).catch(e => {
					this.$message.error("网络连接超时");
				})                
                console.log(this.editcommonproject.noaddress.reId);
            },
            // 修改页面弹窗 修改按钮
            editonSubmit(formName) {
                console.log(this.editcommonproject.noaddress.reId);
                if(this.editcommonproject.address.length == 1){
        			this.editcommonproject.noaddress.proAddress = this.editcommonproject.address[0].provinceValue +'-'+this.editcommonproject.address[0].cityValue+'-'+this.editcommonproject.address[0].areaValue+'-'+this.editcommonproject.address[0].detailAddress;
        		}else{
        			this.editcommonproject.noaddress.proAddress = this.editcommonproject.address[0].provinceValue +'-'+this.editcommonproject.address[0].cityValue+'-'+this.editcommonproject.address[0].areaValue+'-'+this.editcommonproject.address[0].detailAddress;
        			for(let i=1;i<this.editcommonproject.address.length;i++){        				
        				this.editcommonproject.noaddress.proAddress = this.editcommonproject.noaddress.proAddress +','+this.editcommonproject.address[i].provinceValue +'-'+this.editcommonproject.address[i].cityValue+'-'+this.editcommonproject.address[i].areaValue+'-'+this.editcommonproject.address[i].detailAddress;
        			}        		
        		}
            	this.$refs[formName].validate((valid) => {
                    if (valid) {
		                axios({
		                    method: 'post',
		                    url: '/dzjap/generecord/update',
		                    // data中必须有reId
		                    data: this.editcommonproject.noaddress
		                }).then((res) => {
		                    console.log(res);
		                    if (res.data.code == 200) {
		                        // 提交成功将要执行的代码
		                        this.getData();
		                        this.$message({
		                            message: '修改成功',
		                            type: 'success'
		                        });
		                        this.editdialogForm = false;
		                    }
		                });
		        	} else {
                        console.log("error!!");
                        return false;
                    }
                });    
            },
            // 操作按钮：删除
            del(index, row) {
                this.$confirm('确定要删除吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    axios({
                        method: 'post',
                        url: '/dzjap/generecord/delete/' + row.reId,
                    }).then((res) => {
                        console.log(res);
                        if (res.data.code == 200) {
                            this.commonproject.splice(index, 1);
                            this.getData();
                            this.$message({
                                type: 'success',
                                message: '删除成功!'
                            });
                        }
                    });
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消删除'
                    });
                });
            },
            // 操作按钮：提交
            submit(index, row) {
                this.$confirm('确定要提交吗?', '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    // 若提交状态为0:未提交
                    if (row.checkStatus == '0') {
                        axios({
                            method: 'post',
                            url: '/dzjap/generecord/submit/' + row.reId,
                        }).then((res) => {
                            console.log(res.data);
                            if (res.data.code == 200) {
                                // 提交成功将要执行的代码
                                console.log(res.data.msg);
                                this.getData();
                                this.$message({
                                    type: 'success',
                                    message: '提交成功!'
                                });
                            }
                        });
                    } else {
                        this.$message({
                            type: 'error',
                            message: '已提交，不可再提交！'
                        });
                    }
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消提交'
                    });
                });
            },
            // 审定查看
            check(index, row) {
                this.checkdialogForm = true;
                // 设置用户信息默认值
                this.checkcommonproject.checkUser = this.userName;
                this.checkcommonproject.checkOrg = this.orgName + '地震局';
                this.checkcommonproject = row;
            },
            clearForm(){
            	this.gonggao = {
                    publicId: '',
                    relationId: '',
                    content: '',
                    publicState: '',
                    publicType: '',
                    title: '', // 标题
                    attachContent: '', //
                    isPublic: '0',
                    dateImplementation:'',
                    lawsType:'',
                    releaseNumber:'',
                    keyword:''
                }
            },
            // 点击查看公告
            viewgongGao(index,row){
                // 公告表单重置
                this.clearForm();
            	this.dialogGongGaoViewForm = true;
                axios({
                    method: 'get',
                    url: '/dzjap/publick/getGlPublick',
                    params: {
                        relationId: row.reId
                    }
                })
				.then(response => {
					let data = response.data;
					if (data.code == 200) {
						let rowdata = response.data.data;
                        // 公告的附件
                        this.link = "../upload/annex.html?uuid=" + rowdata.publicId + "&flag=0";
                        console.log("查看公告ID:" + rowdata.publicId);
                        this.gonggao = rowdata;
					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
			},
            // 点击拟制公告，进入dialog拟制页面
            gongGao(index, row) {
                this.clearForm();
                this.dialogGongGaoForm = true;
                this.viewcommonproject = row;
                this.gonggao.relationId = row.reId;
                // 获取uuid并且赋值给this.uuid
                this.getUuid();
                console.log("点击进入公告ID:" + this.uuid);
            },
            // 拟制公告--发布
            release() {
                this.$refs['gonggao'].validate((valid) => {
                   if(valid) {
                       // 赋值主键ID,-->重要
                       this.gonggao.publicId = this.uuid;
                       this.gonggao.attachContent = this.gonggao.attachContent.replace(/[\n\r]/g,'<br/>');
                       console.log("发布公告ID:" + this.gonggao.publicId);
                       axios({
                           method: 'post',
                           url: '/dzjap/generecord/addPublick/',
                           data: this.gonggao
                       }).then(response => {
                           let data = response.data;
                           if (data.code == 200) {
                               // 拟制公告--发布成功
                               this.$message({
                                   message: '拟制公告发布成功',
                                   type: 'success'
                               });
                               // 公告表单重置
                               this.clearForm();
                               this.getData();
                               this.dialogGongGaoForm = false;
                           } else {
                               this.$message.error(data.msg);
                           }
                       }).catch(function (error) {
                           console.log(error);
                       });
                   }
                });
            },
            addAddress(){
            	this.newcommonproject.address.push({
            		provinceValue:'',
	                cityValue:'',
	                areaValue:'',
	                detailAddress:'',
	                provinceData:[],
                	cityData:[],
                	areaData:[]
            	})
            	axios.get('../../json/ChinaCity.json').then(res=>{
					this.newcommonproject.address.forEach((item, index) => {
	                    item.provinceData = res.data;
	                })
				}).catch(e => {
					this.$message.error("网络连接超时");
			   })
            	this.editcommonproject.address.push({
            		provinceValue:'',
	                cityValue:'',
	                areaValue:'',
	                detailAddress:'',
	                provinceData:[],
                	cityData:[],
                	areaData:[]
            	})
            	axios.get('../../json/ChinaCity.json').then(res=>{
					this.editcommonproject.address.forEach((item, index) => {
	                    item.provinceData = res.data;
	                })
				}).catch(e => {
					this.$message.error("网络连接超时");
			   	})
            	
            },
            delAddress(index,item){
            	this.newcommonproject.address.splice(index, 1);
            	this.editcommonproject.address.splice(index, 1);
            },
            // 地区三级联动数据选择
            chooseProvince(item){
            	console.log(item)
            	console.log(item.provinceValue)
                item.cityValue='';
                item.areaValue='';
                item.cityData = [];
                item.areaData = [];
                item.provinceData.map(e=>{//遍历数据
                    if( item.provinceValue == e.name){
	                    item.cityData = e.cityList;
	                    return;
                	}
            	})
            },
            chooseCity(item){
                item.areaValue='';
                item.cityData.map(e=>{//遍历数据
                    if( item.cityValue == e.name){
	                    item.areaData = e.areaList;
	                    return;
	                }
            	})
            },
            chooseArea(item){
                console.log(item)
                console.log(item.areaValue)              
            },
            handleChange(file, fileList) {
                this.fileList = fileList.slice(-3);
            },
        }
    })
</script>
</body>
</html>